home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / uim-common / KEY < prev    next >
Encoding:
Text File  |  2004-12-05  |  2.4 KB  |  81 lines

  1. Key-bindings
  2.  
  3.  uim has a key-binding method called 'define-key'. You can use
  4.  define-key in ~/.uim to customize key-bindings. As rough
  5.  explanation, there are some basic rules.
  6.  
  7.  1. it accepts single ascii char
  8.     (define-key anthy-kana-toggle-key? "q")
  9.  
  10.  2. single ascii char is case sensitive
  11.     (define-key anthy-commit-as-opposite-kana-key? "Q")
  12.  
  13.  3. it also accepts keysyms (see uim-key.c for now)
  14.     (define-key generic-beginning-of-preedit-key? "home")
  15.  
  16.  4. it also accepts previously defined key
  17.     (define-key anthy-delete-key? 'generic-delete-key?)
  18.  
  19.  5. keys can be modified
  20.     (define-key my-delete-key? "<Control>d")
  21.     (define-key reset-key? "<Control><Alt>delete")
  22.  
  23.  6. <Shift> modifier is implied for single ascii char appropriately
  24.     (define-key foo-key? "<Control>A")  ;actually Control + Shift + a
  25.     (define-key foo2-key? "<Control>a") ;actually Control + a
  26.     (define-key bar-key? "<Alt>%")      ;actually Alt + Shift + 5
  27.     (define-key baz-key? "<Shift>home") ;non-ascii keys need explicit shift
  28.  
  29.  7. keys can be or'ed
  30.     (define-key anthy-hankaku-kana-key? '("<Control>q" "<Control>Q"))
  31.     (define-key anthy-on-key? '("<Control>j" "<Control>J" generic-on-key?))
  32.  
  33.  And some advanced rules.
  34.  
  35.  8. it also accepts define-time dereference rather than runtime dereference
  36.     (define-key my-on-key? generic-on-key?)
  37.     ;after now, redefinition of generic-on-key? not affects my-on-key?
  38.  
  39.     ;overriding preexisting definition
  40.     (define-key generic-on-key? (list "<Alt>`" generic-on-key?))
  41.  
  42.     ;bad definition: causes infinite loop
  43.     (define-key generic-on-key? (list "<Alt>`" 'generic-on-key?))
  44.  
  45.  9. it also accepts emacs-like syntax
  46.     (define-key my-delete-key? "C-d")
  47.     (define-key reset-key? "C-A-delete")
  48.     (define-key baz-key? "S-home")
  49.     (define-key anthy-on-key? '("C-j" "C-J" generic-on-key?))
  50.  
  51.  
  52. Customization guide
  53.  
  54.  We have no GUI-based customization tool yet. Try following
  55.  steps for now.
  56.  
  57.  1. Collect predefined key-bindings
  58.  
  59.    $ fgrep -h '(define-key' /usr/share/uim/*.scm | grep -v zaurus >> ~/.uim
  60.  
  61.    * '/usr/share/uim' is varied by your installation settings
  62.  
  63.  2. Edit your own .uim
  64.  
  65.    Rewrite the collected definitions for you.
  66.  
  67.  
  68. Examples
  69.  
  70.  To be described.
  71.  
  72.  
  73. FAQ
  74.  
  75.   Q. "<Control>a" does not catch 'Control + Alt + a'. Is this a bug?
  76.   A. No. uim does exact match. Following 2 definitions are
  77.      distinguished.
  78.  
  79.    (define-key foo-key? "<Control>a")
  80.    (define-key bar-key? "<Control><Alt>a")
  81.